package com.myspace.backend.controller.user;

import com.myspace.backend.service.user.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;

    @GetMapping("/myspace/user/userinfo/")
    public Map<String, String> getUserinfo(@RequestParam Map<String, String> map) {
        String userId = map.get("user_id");
        return userInfoService.getUserinfo(userId);
    }
}
